import request from '@/utils/request'

/**
 * 获取指定时间段的订单统计数据
 * */
export const dashboard = (param) => {
  return request.get('/store/dashboards/data', param, { load: false })
}

/**
 * 获取指定时间段的订单趋势
 * */
export const getOrderTrendData = (param) => {
  return request.get('/store/dashboards/order-trend-data', param, { load: false })
}

/**
 * 获取指定时间段的渠道销售占比、渠道GMV占比
 * */
export const getShopChannelData = (param) => {
  return request.get('/store/dashboards/channel-data', param, { load: false })
}

/**
 * 获取门店销售TOP、线上类目销售TOP、单品销售TOP
 * */
export const getTopData = (param) => {
  return request.get('/store/dashboards/goods-top-data', param)
}
